package com.wjcxf.struct;

import java.sql.ResultSet;
import java.sql.SQLException;

public class BARow {
    private int id;
    private int guess;
    private int answer;
    private int ge;
    private int shi;
    private int bai;
    private int qian;
    private int depth;
    private int a;
    private int b;
    private int pid;
    private int ge1;
    private int shi1;
    private int bai1;
    private int qian1;

    public BARow(int id, int guess, int answer, int ge, int shi, int bai, int qian, int depth, int a, int b, int pid, int ge1, int shi1, int bai1, int qian1) {
        this.id = id;
        this.guess = guess;
        this.answer = answer;
        this.ge = ge;
        this.shi = shi;
        this.bai = bai;
        this.qian = qian;
        this.depth = depth;
        this.a = a;
        this.b = b;
        this.pid = pid;
        this.ge1 = ge1;
        this.shi1 = shi1;
        this.bai1 = bai1;
        this.qian1 = qian1;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getGuess() {
        return guess;
    }

    public void setGuess(int guess) {
        this.guess = guess;
    }

    public int getAnswer() {
        return answer;
    }

    public void setAnswer(int answer) {
        this.answer = answer;
    }

    public int getGe() {
        return ge;
    }

    public void setGe(int ge) {
        this.ge = ge;
    }

    public int getShi() {
        return shi;
    }

    public void setShi(int shi) {
        this.shi = shi;
    }

    public int getBai() {
        return bai;
    }

    public void setBai(int bai) {
        this.bai = bai;
    }

    public int getQian() {
        return qian;
    }

    public void setQian(int qian) {
        this.qian = qian;
    }

    public int getDepth() {
        return depth;
    }

    public void setDepth(int depth) {
        this.depth = depth;
    }

    public int getA() {
        return a;
    }

    public void setA(int a) {
        this.a = a;
    }

    public int getB() {
        return b;
    }

    public void setB(int b) {
        this.b = b;
    }

    public int getPid() {
        return pid;
    }

    public void setPid(int pid) {
        this.pid = pid;
    }

    public int getGe1() {
        return ge1;
    }

    public void setGe1(int ge1) {
        this.ge1 = ge1;
    }

    public int getShi1() {
        return shi1;
    }

    public void setShi1(int shi1) {
        this.shi1 = shi1;
    }

    public int getBai1() {
        return bai1;
    }

    public void setBai1(int bai1) {
        this.bai1 = bai1;
    }

    public int getQian1() {
        return qian1;
    }

    public void setQian1(int qian1) {
        this.qian1 = qian1;
    }

    public static BARow parseToBARow(ResultSet resultSet) throws SQLException {
        BARow row = new BARow(resultSet.getInt("id"),
                resultSet.getInt("guess"),
                resultSet.getInt("answer"),
                resultSet.getInt("ge"),
                resultSet.getInt("shi"),
                resultSet.getInt("bai"),
                resultSet.getInt("qian"),
                resultSet.getInt("depth"),
                resultSet.getInt("a"),
                resultSet.getInt("b"),
                resultSet.getInt("pid"),
                resultSet.getInt("ge1"),
                resultSet.getInt("shi1"),
                resultSet.getInt("bai1"),
                resultSet.getInt("qian1"));
        return row;

    }



}
